<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width" />
	<meta name="author" content="www.lzqcode.com" />
    <title>文章阅读</title>
    <link rel="stylesheet" th:href="@{../../static/desk/font-awesome/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{../../static/desk/layui/css/layui.css}" />
    <link rel="stylesheet" th:href="@{../../static/desk/css/master.css}" />
    <link rel="stylesheet" th:href="@{../../static/desk/css/gloable.css}" />
    <link rel="stylesheet" th:href="@{../../static/desk/css/nprogress.css}" />
    <link rel="stylesheet" th:href="@{../../static/desk/css/blog.css}" />
    <link rel="stylesheet" th:href="@{/static/desk/css/message.css}" />
</head>
<body>
    <div class="header">
    </div>

    <header th:insert="front_template :: header"></header>

    <div class="doc-container" id="doc-container">
        <div class="container-fixed">
            <div class="col-content" style="width:100%">
                <div class="inner">
                    <article class="article-list">
                        <input type="hidden" value="@Model.BlogTypeID" id="blogtypeid" />
                        <section class="article-item">
                            <aside class="title" style="line-height:1.5;">
                                <h4 th:utext="${article.title}"></h4>
                                <p class="fc-grey fs-14">
                                    <small>
                                        作者：<a th:href="@{|/user/center/${user.id}|}" target="_blank" class="fc-link" th:text="${user.realName}"></a>
                                    </small>
                                    <small class="ml10">围观群众：<i class="readcount" th:text="${article.viewCount}"></i></small>
                                    <small class="ml10">更新于 <label th:text="${#dates.format(article.createDate,'yyyy-MM-dd')}"></label> </small>
                                </p>
                            </aside>
                            <div class="content artiledetail" style="border-bottom: 1px solid #e1e2e0; padding-bottom: 20px;">
                                <div th:utext="${article.content}">

                                </div>
                                <div class="copyright mt20">
                                    <p class="f-toe fc-black">
                                        非特殊说明，本文版权归 <a href="#" th:text="${user.realName}"></a> 所有，转载请注明出处.
                                    </p>
                                    <p class="f-toe">
                                        本文标题：
                                        <a href="javascript:void(0)" class="r-title" th:utext="${article.title}"></a>
                                    </p>
                                    <p class="f-toe">
                                        论坛网址：
                                        <a th:href="@{/article/list}">http://localhost:8991/article/list</a>
                                    </p>
                                </div>
                                <div id="aplayer" style="margin:5px 0"></div>
                                <h6>延伸阅读</h6>
                                <ol class="b-relation"></ol>
                            </div>
                            <div class="bdsharebuttonbox share" data-tag="share_1">
                                <ul>
                                    <li class="f-praise"><span><a class="s-praise"></a></span></li>
                                    <li class="f-weinxi"><a class="s-weinxi" data-cmd="weixin"></a></li>
                                    <li class="f-sina"><a class="s-sina" data-cmd="tsina"></a></li>
                                    <li class="f-qq"><i class="fa fa-qq"></i></li>
                                    <li class="f-qzone"><a class="s-qzone" data-cmd="qzone"></a></li>
                                </ul>
                            </div>
                            <div class="f-cb"></div>
                            <div class="mt20 f-fwn fs-24 fc-grey comment" style="border-top: 1px solid #e1e2e0; padding-top: 20px;">
                            </div>
                            <fieldset class="layui-elem-field layui-field-title">
                                <legend>评论区</legend>
                                <ul class="message-list" id="message-list">
                                    <li class="zoomIn article" th:each="cvo:${comments}">
                                        <div class="comment-parent">
                                            <a name="remark-1"></a>
                                            <img th:src="${cvo.user.avatarUrl}" />
                                            <div class="info">
                                                <span class="username" th:utext="${cvo.user.realName}"></span>
                                            </div>
                                            <div class="comment-content" th:utext="${cvo.comment.content}">

                                            </div>
                                            <p class="info info-footer">
                                                <i class="fa fa-calendar" aria-hidden="true"></i>
                                                <span class="comment-time"> <b th:text="${#dates.format(cvo.comment.createDate,'yyyy-MM-dd HH:mm:ss')}"></b></span>
                                                <a href="javascript:;" class="btn-reply" data-targetid="1" data-targetname="">回复</a>
                                            </p>
                                        </div>
                                        <hr />
                                        <div class="comment-child" th:each="rvo:${cvo.replys}">
                                            <a name="reply-1"></a>
                                            <img th:src="${rvo.user.avatarUrl}">
                                            <div class="info">
                                                <span th:if="${rvo.target==null}">
                                                    <span class="username" th:text="${rvo.user.realName}"></span>
                                                </span>
                                                <span th:if="${rvo.target!=null}">
                                                    <span class="username" th:text="${rvo.user.realName}"></span>
                                                    <span style="padding-right:0;margin-left:-5px;">回复</span>
                                                    <span class="username" th:text="${rvo.target.realName}"></span>
                                                </span>
                                                <span th:utext="${rvo.reply.content}"></span>
                                            </div>
                                            <p class="info">
                                                <i class="fa fa-calendar" aria-hidden="true"></i>
                                                <span class="comment-time" th:text="${#dates.format(rvo.reply.createDate,'yyyy-MM-dd HH:mm:ss')}"></span>
                                                <a href="javascript:;" class="btn-reply" data-targetid="2" data-targetname="">回复</a>
                                            </p>
                                            <div class="replycontainer">
                                                <form class="layui-form" method="post" th:action="@{|/comment/add/${article.id}|}">
                                                    <input type="hidden" name="entityType" value="2">
                                                    <input type="hidden" name="entityId" th:value="${cvo.comment.id}">
                                                    <input type="hidden" name="targetId" th:value="${rvo.user.id}">
                                                    <div class="layui-form-item">
                                                        <textarea name="content" lay-verify="content" th:placeholder="|回复${rvo.user.realName}|" class="layui-textarea" style="min-height:80px;"></textarea>
                                                    </div>
                                                    <div class="layui-form-item">
                                                        <button class="layui-btn layui-btn-xs" lay-submit="formReply" lay-filter="formReply">提交</button>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                        <form class="layui-form" method="post" th:action="@{|/comment/add/${article.id}|}">
                                            <input type="hidden" name="entityType"  value="2">
                                            <input type="hidden" name="entityId"  th:value="${cvo.comment.id}">
                                            <div class="layui-form-item">
                                                <textarea name="content" lay-verify="content" placeholder="请输入回复内容" class="layui-textarea" style="min-height:80px;"></textarea>
                                            </div>
                                            <div class="layui-form-item">
                                                <button class="layui-btn layui-btn-xs" type="submit" lay-submit="formReply" lay-filter="formReply">提交回复</button>
                                            </div>
                                        </form>
                                    </li>
                                </ul>


                                <form class="layui-form blog-editor" method="post" th:action="@{|/comment/add/${article.id}|}">
                                    <input type="hidden" name="entityType"  value="4">
                                    <input type="hidden" name="entityId"  th:value="${article.id}">
                                    <div class="layui-form-item">
                                        <textarea name="content" lay-verify="content"  placeholder="请输入评论内容" class="layui-textarea "></textarea>
                                    </div>
                                    <div class="layui-form-item" align="right">
                                        <button class="layui-btn" lay-submit="formLeaveMessage" type="submit" lay-filter="formLeaveMessage">提交评论</button>
                                    </div>
                                </form>
                            </fieldset>
                            <ul class="blog-comment" id="blog-comment"></ul>
                        </section>
                    </article>
                </div>
            </div>
        </div>
    </div>
    <footer th:insert="front_template :: footer"></footer>
    <script th:src="@{../../static/desk/layui/layui.js}"></script>
    <script th:src="@{../../static/desk/js/yss/gloable.js}"></script>
    <script th:src="@{../../static/desk/js/plugins/nprogress.js}"></script>
    <script th:src="@{../../static/desk/js/pagecomment.js}"></script>
    <script>NProgress.start();</script>
    <script> 
        window.onload = function () {
            NProgress.done();
        };
    </script>
</body>
</html>
